<template>
	<div class="orderprev_div">
		<div class="payheader_div">
			<span  class="btn_back" @click="btn_back">返回</span>
			订单预览
		</div>
		<div>
			<li class="collGood_li">
		    	<div class="collGoodIimg_div">
		    		<img src="../../assets/img/hot1.png" alt="" style="width: 100%; height:100%; ">
		    	</div>
		    	<div class="collGoodInfo_div">
		    		<p class="collGoodTitle">北京一日游</p>
		    		<p class="collGoodInfo">
		    			<span class="fl">出行人群：成人</span>
		    			<span class="fr">-￥40</span>
		    		</p>
		    		<p class="collGoodPrice">￥700</p>
		    	</div>
		    </li>
		</div>
		<p class="line_p">
			<span>姓名：</span>
			<span>{{curOrderInfo.member.name}}</span>
		</p>
		<p class="line_p">
			<span>电话：</span>
			<span>{{curOrderInfo.member.mobile}}</span>
		</p>
		<p class="line_p">
			<span>支付方式：</span>
			<span>微信支付</span>
		</p>

		<p class="btn_login" @click="btn_commit()">提交订单</p>


	</div>
</template>
<script>
	export default{
		name:'orderprev',
		data(){
			return {
				data_gouwucheId:'',
				payCode:'',
				payName:'',
			}
		},
		computed:{
			curOrderInfo(){
				this.payCode = 'WXPAY'//this.$store.state.order.data_orderPrev.payMapList[0].payCode;
				this.payName = '微信支付'//this.$store.state.order.data_orderPrev.payMapList[0].payName;
				return this.$store.state.order.data_orderPrev;
			}
		},
		methods:{
			getOrDetailPrev(){
				this.data_gouwucheId = this.$route.params.goodId;
				this.$store.dispatch("get_orderDetInfo",this);
				console.log(this.$route.params)
			},
			btn_back:function(){
				this.$router.go(-1);
			},
			//提交订单
			btn_commit:function(){
				this.$store.dispatch('get_commitOrder',this)
			}
		},
		mounted:function(){
			this.getOrDetailPrev()
		},
		watch:{
			"$route": "getOrDetailPrev" 
		}
	}
</script>
<style rel="stylesheet" lang="scss" scoped>
	@import "../../assets/css/main.scss";
	.line_p{
		height: 1.4667rem;
		line-height: 1.4667rem;
		padding: 0 0.4rem;
		background-color: #FFF;
		border-bottom: 1px solid #F5F5F5;
		span{
			display: inline-block;
		}
		& span:first-child{
			width: 1.7333rem;
			text-align: left;
		}
	}
</style>
